//package com.shop.loan.controller;
//
//import com.alipay.api.AlipayApiException;
//import com.shop.loan.annotation.LoginAuth;
//import com.shop.loan.model.common.Constant;
//import com.shop.loan.model.common.ResResult;
//import io.swagger.annotations.*;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import springfox.documentation.annotations.ApiIgnore;
//
//import javax.annotation.Resource;
//import javax.servlet.http.HttpServletRequest;
//import java.io.UnsupportedEncodingException;
//
//@Api(value = "支付模块", tags = "支付模块")
//@RestController
//@RequestMapping(Constant.appPrefex + "/alipay")
//public class AliPayController {
//
//    @Resource
//    AliPayService aliPayService;
//
//    @LoginAuth
//    @ApiOperation("创建订单")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "type", value = "1：预授权   2：支付", required = true, dataType = "int"),
//            @ApiImplicitParam(name = "orderId", value = "订单id", required = true, dataType = "int"),
//            @ApiImplicitParam(name = "payType", value = "支付类型（大写）  首款+屏幕险：PS   P：首款   R：还款   S：屏幕险   B:买断", required = true, dataType = "string"),
//            @ApiImplicitParam(name = "periods", value = "第几期，若是还款需要传", dataType = "int"),
//    })
//    @PostMapping("/createOrder")
//    public ResResult createOrder(@ApiIgnore AliPayOrderVo aliPayOrderVo) throws AlipayApiException {
//        return aliPayService.createOrder(aliPayOrderVo);
//    }
//
//    @ApiIgnore
//    @PostMapping(value = "/notify")
//    public String alipayNotify(HttpServletRequest httpServletRequest) throws AlipayApiException, UnsupportedEncodingException {
//        return aliPayService.alipayNotify(httpServletRequest);
//    }
//
//}
